package com.abc.robot01.retrofit.bean

import androidx.compose.runtime.mutableStateOf


// Request Data Model
data class FetchDataRequest(
    val offset: Int,
    val fetchSize: Int,
    val robotId: String,
    val homePageConfigId: String
)

data class FetchDataRequest2(
    //默认私库
    val isPublic: Int = 0,
    val minPrice: Int = 0,
    val maxPrice: Int = 99999999,
    val offset: Int = 0,
    val fetchSize: Int = 10000,
    val orderBy: String = "price asc",
    val interest: String = "",
    val name: String = "",
    val brand: String = "",
    val series: String = "",
)

data class FetchDataRequest9<T>(
    val condition: T,
    val offset: Int = 0,
    val fetchSize: Int = 1000000,
)


data class FetchDataRequest456(
    val childTypes: List<String> = listOf("REPLACE"),
//    val childType: String = "RENDER",
    val isReturnExtData: Int =1,
    val fetchSize: Int = 999999995,
//    val fetchSize: Int = 50,
    val offset: Int = 0,
    var createTimeBegin: String = "2004-08-26 00:00:00",
    var createTimeEnd: String = "2923-08-26 23:59:59",
)


data class Condition(
    var isPublic: Boolean = true,
    val status: String = "Y",
    val name: String = "",
    val interests: String = "",
    val styles: String = "",
    val useTypeCodes: String = "",
    val yzPriceRange: String = "",
    val labelId: String = "",
)


data class RenderItem147(
    /**
     *   0 为开始
     *   1 为中间
     *   2 为末尾.
     */
    val position:Int = -1,
    val id:String = "0" ,
    val status:Int = -1 ,
    val url:String? = "" ,
    val isTitle: Boolean  = false,
    val count: Int  = 0,
    val device: String = "设备001",
    val name: String? = "无名称",
    val date: String = "2023年7月23日 15:12"
)

data class RenderItem148(
    /**
     *   0 为开始
     *   1 为中间
     *   2 为末尾.
     */
    val position:Int = -1,
    val id:String = "0" ,
    val url:String? = "" ,
    val content:String = "" ,
    val isTitle: Boolean  = false,
    val count: Int  = 0,
    val payStatus: Int  = 0,
    val success: Boolean = true,
    val device: String = "设备001",
    val name: String = "沿海地中海风格三室两厅",
    val date: String = "2023年7月23日 15:12",
    val designPackageName:String? = "" ,
    val housePlansName:String? = "" ,
    val childType:String = "" ,
    val designPackageId:String = "" ,
    val housePlansDataId:String = "" ,
    val housePlansId:String = "" ,
    val taskId:String = "" ,
)




data class Condition2(
    val name: String = "",
    val estate: String = "",
    val houseType: String = "",
    val createUserIds: String = "",
)

data class Condition20(
    val name: String = "",
    val remarks: String = "",
)

data class Condition21(
    val companyId: String = "",
)

data class PaymentRequest(
    val userId: String, // 当前操作的真实用户ID，非机器人ID
    val companyId: String, // 当前用户/机器人归属的公司ID
    val purseType: String, // 钱包类型：PERSONAL 个人账户，COMPANY 公司账户
    val totalAmount: Double, // 需要支付的总金额
    val pursePayAmount: Double, // 钱包需要支付的金额
    val thirdPayAmount: Double, // 第三方需要支付的金额
    val robotId: String, // 当前操作的机器人ID
    val source: Int, // 来源：1.抖音小程序 2.PC工具 3.机器人APP 4.微信小程序
    val productType: Int, // 产品类型：充值、提现等
    val userOrderDetailDTOList: List<UserOrderDetail>
)

data class RenderPaymentRequest(
    val userId: String, // 当前操作的真实用户ID，非机器人ID
    val renderName: String, // 渲染名称
    val companyId: String, // 当前用户/机器人归属的公司ID
    val purseType: String = "COMPANY", // 钱包类型：PERSONAL 个人账户，COMPANY 公司账户
    val totalAmount: Double, // 需要支付的总金额
    val pursePayAmount: Double = 0.0, // 钱包需要支付的金额
    val thirdPayAmount: Double = 0.0, // 第三方需要支付的金额
    val robotId: String, // 当前操作的机器人ID
    val customerName: String, //客户姓名
    val customerPhone: String, //客户手机号
    val source: Int = 3, // 来源：1.抖音小程序 2.PC工具 3.机器人APP 4.微信小程序
    val productType: Int = 7, // 产品类型：充值、提现等
    val orderType: Int = 0,
    val userOrderDetailDTOList: List<UserOrderDetailDTO>
)

data class Condition7(
    val customerName: String,
    val customerPhone: String,
    val beginTime: String = "2024-08-26 00:00:00",
    val endTime: String = "2923-08-26 23:59:59",
)

data class Condition701(
    val isPublic :Boolean = true,
    val isUpper: String = "Y",
    val dType: String = "MATERIAL",
    val firstCommodityTreeId: String = "cz",
    val orderBy: String = "create_time",
)

data class Condition70(
    var createTimeStart: String = "2004-08-26 00:00:00",
    var createTimeEnd: String = "2923-08-26 23:59:59",
    val isQueryConfigDetail: Int = 0,        // 产品类型（与外层相同）
)

data class Condition8(
    val name: String="",
)

data class Condition3(
    val customerName: String = "",
    val customerPhone: String = "",
    val customerStatus: String = "",
)

data class RenderPaymentRequest2(
    val id: String,
    val housePlanId: String,
    val name: String,
    val renderQueueType: String = "NORMAL",
    val skyBoxId: String,
)

data class UserOrderDetailDTO(
    val productId: String,       // 整体方案ID
    // 产品类型：1 精品方案, 2 分部方案, 3 模型, 4 贴图, 5 材质, 6 户型图, 7 渲染, 8 任务, 9 服务, 10 充值, 11 提现, 12 产品包购买
    val productType: Int,        // 产品类型（与外层相同）
    val productUserId: String,   // 当前用户ID
    val productCompanyId: String, // 当前用户归属公司ID
    val productAmount: Double,   // 产品金额
    val detail: String           // 订单明细，JSON格式字符串
)

data class UserOrderDetail(
    val productId: String = "",
    val productType: Int = 10, // 与外层productType相同
    val productUserId: String = "",
    val productCompanyId: String = "",
    val productAmount: Double // 与外层totalAmount相同
)

data class RequestData(
    val sn: String,            // 机器人SN码
    val type: Int,             // 业务数据类型
    val rid: String,      // 随机ID
    val paramsDTO: ParamsDTO   // 视具体业务传参
)

data class ParamsDTO(
    val designPackageId: String? = null,  // 上传户型图时传
    val userOrderId: String? = null       // 支付时传
)

data class Data789(
    val userOrderId: String,
    val qrCode: String
)

data class ApiResponse<T>(
    val data: T,
    val code: Int,
    val message: String
)

data class ResponseData(
    val code: Int,
    val message: String
)

data class Data12345(
    val userOrderId: String,
    val qrCode: String
)

data class ApiResponse2<T>(
    val msg: String,
    val code: Int,
    val data: T,
    val message: String,
    val key: String?
)

// DataItem class
data class DataItem(
    val configType: String,
    val configs: List<Config>,
    val groupSort: Int
)

// Config class
data class Config(
    val id: String,
    val createTime: String,
    val updateTime: String,
    val isValid: Int,
    val robotId: String,
    val groupSort: Int,
    val sort: Int,
    val configType: String,
    val designPackageId: String?,
    val fileUrl: String,
    val thumbnail: String,
    val renderUrl: String,
    val createUserId: String,
    val updateUserId: String
)

// Root response class
data class Data(
    val total: Int,
    val list: List<Item>
)

// Root response class
data class Item(
    val id: String,
    val createTime: String,
    val updateTime: String,
    val isValid: String?,
    val firstCommodityTreeId: String,
    val firstCommodityTreeName: String,
    val commodityTreeId: String,
    val commodityTreeName: String,
    val commodityTreeIdWz: String?,
    val commodityTreeNameWz: String?,
    val name: String,
    val sxType: String?,
    val modelId: String?,
    val price: Double,
    val userId: String,
    val onlineStatus: String,
    val comType: String?,
    val status: String,
    val typeStr: String?,
    val materialRootId: String?,
    val wtStatus: String?,
    val attrJson: String?,
    val unit: String,
    val width: String?,
    val high: String?,
    val thickness: String?,
    val loss: String?,
    val specialRatio: String?,
    val comBody: String?,
    val labelId: String,
    val brand: String?,
    val marking: String?,
    val series: String?,
    val thumbnail: String?,
    val imgs: String?,
    val isGroup: String?,
    val atrr: String?,
    val style: String?,
    val interest: String?,
    val address: String?,
    val companyId: String?,
    val ryz: String?,
    val stuffStr: String?,
    val color: String?,
    val materialChannelId: String?,
    val isChoice: String,
    val relatedMaterialId: String?,
    val relatedMaterialType: String?,
    val waveguideLine: String?,
    val unitName: String?,
    val labelNames: String?,
    val interestName: String?,
    val sxTypeName: String?,
    val createUserName: String,
    val commodityId: String,
    val isTop: Int
)

// Config class
data class LocalConfig(
    val type: String,
    val url: String,
    val configId: String,
    val robotId: String,
    val designPackageId: String="",
)

data class SkyBoxData(
    val id: String,
    val createTime: String,
    val updateTime: String,
    val skyBoxId: String,
    val name: String,
    val imgUrl: String,
    val type: String,
    val isValid: Int
)

data class Data05(
    val id: String?,            // Nullable ID
    val createTime: String?,    // Nullable creation time
    val updateTime: String?,    // Nullable update time
    val isValid: Boolean?,      // Nullable boolean validity
    val sn: String,             // Serial number
    val type: Int,              // Type (Integer)
    val rid: String,            // Random ID
    val params: String?,        // Nullable parameters
    val status: String,         // Process status
    val result: String?,        // Nullable result
    val paramsDTO: Any?,   // Nested ParamsDTO object
    val resultDTO: String?      // Nullable resultDTO
)

data class LoginResponse(
    val data: String,
)

data class UserData(
    val userId: String?,
    val companyId: String?,
    val qrCode: String?,
    val accessToken: String
)

data class RenderQueueData(
    val id: String,
    val createTime: String,
    val updateTime: String,
    val renderQueueType: String,
    val name: String,
    val timeType: String,
    val basicRatio: Double,
    val ratio: Double,
    val isValid: Int
)

data class RoomData(
    val style: Int,
    val designPackageId: String,
    val roomId: String,
    val roomType: String,
    val matchDetails: Any?, // 因为 matchDetails 可能为 null，可以使用 Any? 或根据需求替换为具体类型
    val roomTypeName: String,
    val renderPrice: Double,
    val match: Boolean
)

data class Customer(
    val customerName: String,
    val customerPhone: String,
    val customerStatus: String,
    val customerStatusValue: String,
    val renderCount: Int,
    val renderTotalAmount: Double,
    val latestCreateTime: String,
    val latestAmount: Double
)

data class Data9(
    val locationTotal: Any?, // Since it's null, using Any? allows flexibility
    val total: Int,
    val list: List<Customer>,
    val totalPages: Any? // Since it's null, using Any?
)

data class Data3(
    val id: String,
    val createTime: String,
    val updateTime: String,
    val isValid: Int,
    val sn: String,
    val type: Int,
    val rid: String,
    val params: String, // params 是一个字符串，可以是 JSON 字符串
    val status: String,
    val result: Any?, // result 可能为 null
    val paramsDTO: Any?,
    val resultDTO: ResultDTO
)

data class ResultDTO(
    val userId: String
)

data class DataB(
    val id: String = "",
    var unitName: String? = "",
    var name: String? = "",
    var price: String = "",
    var thumbnail: String? = null,
    var date: String = "",
)

data class Data5(
    val total: Int,
    val list: List<Commodity>
)

data class TokenData(
    val access_token: String,
    val token_type: String,
    val expires_in: Int,
    val scope: String
)

/**
 * 方案详情
 */
data class DesignPackage(
    val id: String,
    val name: String?,
    val interest: String?,
    val companyName: String?,
    val yzPriceRangeValue: String?,
    val mainTreeStr: String?,
//    val style: String?,
    val floorHeightType: String?,
    val createTime: String?,
    val updateTime: String?,
    val designerName: String?,
    val designerPhone: String?,
    val thumbnail: String?,
    var interestName: String?,
    var styleName: String?,
    var adaptationSpaceValue: String?,
    var labelName: String?,
    var useTypeStr: String?,
    val url: String?,
    val applyCount: Int?,
    val renderCount: Int?,
    val likeNum: Int?,
    val collectNum: Int?,
//    查看数
    val watchNum: Int,
)


data class Commodity(
    val id: String,
    val createTime: String?,
    val spec: String?,
    val updateTime: String?,
    val isValid: Int?,
    val firstCommodityTreeId: String?,
    val firstCommodityTreeName: String?,
    val commodityTreeId: String?,
    val commodityTreeName: String?,
    val commodityTreeIdWz: String?,
    val commodityTreeNameWz: String?,
    val name: String?,
    val sxType: String?,
    val modelId: String?,
    val price: Double?,
    val userId: String?,
    val onlineStatus: String?,
    val comType: String?,
    val status: String?,
    val typeStr: String?,
    val materialRootId: String?,
    val wtStatus: String?,
    val attrJson: String?,
    val unit: String?,
    val width: Double?,
    val high: Double?,
    val thickness: Double?,
    val loss: Double?,
    val specialRatio: String?,
    val comBody: String?,
    val labelId: String?,
    val brand: String?,
    val marking: String?,
    val series: String?,
    val thumbnail: String,
    val isGroup: String?,
    val atrr: String?,
    val style: String?,
    val interest: String?,
    val address: String?,
    val companyId: String?,
    val ryz: String?,
    val stuffStr: String?,
    val color: String?,
    val materialChannelId: String?,
    val isChoice: String?,
    val commodityImg: CommodityImg?,
    val relatedMaterialId: String?,
    val relatedMaterialType: String?,
    val waveguideLine: String?,
    val unitName: String?,
    val labelNames: String?,
    val interestName: String?,
    val sxTypeName: String?,
    val createUserName: String?
)


data class CommodityImg(
    val id: String,
    val createTime: String,
    val updateTime: String,
    val isValid: Int,
    val commodityId: String,
    val videoUrl: String,
    val detailImgUrl: String,
    val rotatingImgs: String
)

data class HouseType(
    val id: String = "-1",
    val updateTime: String = "",
    val code: String = "",
    val name: String = "全部",
    val showIndex: Int = -1,
    val type: String = "",
    val status: String = "-",
    val remark: String = "全部"
)

data class HouseType2(
    val id: String = "-1",
    val updateTime: String = "",
    val code: String = "",
    val name: String = "全部",
    val showIndex: Int = -1,
    val type: String = "",
    val status: String = "-",
    val remark: String = "全部",
    val renderPrice: Double,
    var selected: Boolean = true,
)

data class Item7(
    val id: String,
    val name: String,
    val price: String,
    val thumbnail: String,
    val renderUrl: String,
)

data class Item71(
    val id: String,
    val name: String,
)


data class Item8(
    val id: String,
    val name: String?,
    val price: String,
    val thumbnail: String?,
    val houseType: String,
    val roomNum: Int,
    val hallNum: Int,
    val washroomNum: Int,
    val renderCount: Int,
    val innerArea: Double = 0.0
)

data class HousePlanDataDTO(
    val id: String,
    val name: String,
    val type: String,
    val imageUrl: String,
    val remarks: String,
    val createTime: String,
    val customerName: String,
    val customerPhone: String,

)

const val VIDEO = "VIDEO"
const val ARTICLE = "ARTICLE"
const val DESIGN_PACKAGE = "DESIGN_PACKAGE"

object GlobalState{
    var selected10  = mutableStateOf(false)
    var selected2  = mutableStateOf(false)
    var selected3  = mutableStateOf(false)
    var selected4  = mutableStateOf(false)
}


